import React, { Component } from 'react'
import MyNavLink from '../../components/mynavlink/MyNavLink'
import { Route, Switch, Redirect } from 'react-router-dom'
import Demo1 from './demo1/Demo1'
import Demo2 from './demo2/Demo2'
export default class Home extends Component {
    render() {
        return (
            <div>
                <MyNavLink to="/home/demo1">demo1</MyNavLink>
                <MyNavLink to="/home/demo2">demo1</MyNavLink>
                home---------------
                <br />
                <Switch>
                    <Route path="/home/demo1" component={Demo1} />
                    <Route path="/home/demo2" component={Demo2} />
                    <Redirect to="/home/demo1"/>
                </Switch>


            </div>
        )
    }
}
